import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/Home.vue";
import Login from "../views/Login.vue";

Vue.use(VueRouter);

import Axios from "axios";
import Qs from "qs";

Vue.prototype.$axios = Axios;
Vue.prototype.$qs = Qs;

const routes = [
  {
    path: "/",
    name: "Home",
    component: Home,
  },
  {
    path: "/about",
    name: "About",
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () =>
      import(/* webpackChunkName: "about" */ "../views/About.vue"),
  },
  {
    path: "/login",
    name: "Login",
    component: Login,
  },
  {
    path: "/xsjh/create",
    name: "销售机会创建",
    component: () => import("../views/xsjh/Create.vue"),
  },
  {
    path: "/xsjh/list",
    name: "销售机会列表",
    component: () => import("../views/xsjh/List.vue"),
  },
  {
    path: "/kfjh/create",
    name: "开发计划创建",
    component: () => import("../views/kfjh/CreateInitPlan.vue"),
  },
  {
    path: "/kfjh/list",
    name: "开发计划列表",
    component: () => import("../views/kfjh/List.vue"),
  },
  // {
  //   path: "/khxx/create",
  //   name: "客户信息创建",
  //   component: () => import("../views/khxx/Create.vue"),
  // },
  {
    path: "/khxx/list",
    name: "客户信息列表",
    component: () => import("../views/khxx/List.vue"),
  },
  {
    path: "/khxx/listLXR",
    name: "联系人信息列表",
    component: () => import("../views/khxx/ListLXR.vue"),
  },
  {
    path: "/khxx/listDSJ",
    name: "联系人信息列表2",
    component: () => import("../views/khxx/ListDSJ.vue"),
  },
  {
    path: "/lsdd/create",
    name: "订单创建",
    component: () => import("../views/lsdd/Create.vue"),
  },
  {
    path: "/lsdd/list",
    name: "订单查询",
    component: () => import("../views/lsdd/List.vue"),
  },
  {
    path: "/khls/list",
    name: "客户流失查询",
    component: () => import("../views/khls/List.vue"),
  },
  {
    path: "/khfw/create",
    name: "客户服务创建",
    component: () => import("../views/khfw/Create.vue"),
  },
  {
    path: "/khfw/list",
    name: "客户服务查询",
    component: () => import("../views/khfw/List.vue"),
  },

  {
    path: "/tjbb/list",
    name: "统计报表查询",
    component: () => import("../views/tjbb/List.vue"),
  },
  {
    path: "/tjbb/tjdd",
    name: "统计报表订单查询报表",
    component: () => import("../views/tjbb/tjdd.vue"),
  },
  {
    path: "/tjbb/khsl",
    name: "客户数量查询报表",
    component: () => import("../views/tjbb/khsl.vue"),
  },
  {
    path: "/tjbb/khls",
    name: "客户流失查询报表",
    component: () => import("../views/tjbb/khls.vue"),
  },
  {
    path: "/tjbb/khfw",
    name: "客户服务查询报表",
    component: () => import("../views/tjbb/khfw.vue"),
  },
];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes,
});

export default router;
